package models

import "gorm.io/gorm"

type User struct { //用户
	gorm.Model
	Username string `gorm:"type:varchar(200)"json:"username"`
	Password string `gorm:"type:varchar(300)"json:"password"`
}
type Role struct { //角色
	gorm.Model
	Name string `gorm:"type:varchar(30)"json:"name"`
}
type UserRole struct { //用户与角色
	gorm.Model
	Uid int `gorm:"type:int"json:"uid"`
	Rid int `gorm:"type:int"json:"rid"`
}
type Done struct { //权限
	gorm.Model
	Names string `gorm:"type:varchar(50)"json:"names"`
}
type RoleDone struct { //角色与权限
	gorm.Model
	Rid int `gorm:"type:int"json:"rid"`
	Did int `gorm:"type:int"json:"did"`
}
